package com.dg.cuckoo.admin.repository;

import com.dg.cuckoo.admin.dto.basicInformation.label.OneLabelDto;
import com.dg.cuckoo.admin.dto.basicInformation.permissionSettings.UnitTypeDto;
import com.dg.cuckoo.core.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UnitTypeRepository extends BaseRepository<UnitTypeDto,String> {

    UnitTypeDto findByTypeName(String typeName);

    @Query(value = "select * from unit_type   limit ?,?",nativeQuery = true)
    List<UnitTypeDto> page(Integer page, Integer pageSize);

}
